package com.ybkj.daijia.server.service;

import com.github.pagehelper.PageInfo;
import com.ybkj.daijia.page.Page;
import com.ybkj.daijia.server.model.DriverApply;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author Shine
 */
public interface DriverApplyService {

    /**
     * 分页查询司机申请信息
     *
     * @return
     */
    public PageInfo<DriverApply> queryAll(Integer pageNumber, Integer pageSize);


    /**
     * 保存司机申请信息
     *
     * @param driverApply
     * @return
     */
    public DriverApply insertRecord(DriverApply driverApply);

    /**
     * @throws IOException
     */
    void driverAppApply(HttpServletRequest req, MultipartFile photoFile, MultipartFile idCardPhotoFile, MultipartFile backOfIdCardPhotoFile, MultipartFile licenseFile, MultipartFile qualificationPhotoFile, DriverApply driverApply,
       Boolean copy, Boolean remake);

    /***
     * V1.driverAppApply 测试完毕请整合所有的driverAppApply
     */
    void driverAppApply(HttpServletRequest req, String realName, String phone, MultipartFile photoFile, String emergency, String bankNo, String jobType, MultipartFile idCardPhoto,
        MultipartFile backOfIdCardPhoto, String bankCard, String idCard, MultipartFile licenseFile, MultipartFile travelFile, String genger, String nation, String birthday, String origin, String driverCensus,
        String driverIdcardValid, String driverIdcardInvalid, String bankName, String driverLicenseNo, String address, String vehicleType, String validStartDate, String validEndDate,
        String archiveNum, String introducer,Boolean copy, Boolean remake);
    /**
     * 根据主键查询司机申请信息
     *
     * @param id
     * @return
     */
    public DriverApply findOne(Long id);

    /**
     * 删除司机申请信息
     *
     * @param driverApply
     */
    public void delete(DriverApply driverApply);

    /**
     * 根据身份证查询司机申请信息
     *
     * @param idCard
     * @return
     */
    public DriverApply findByIdCard(String idCard);

    /**
     * 根据手机号查询司机申请信息
     *
     * @param phone
     * @return
     */
    public DriverApply findByPhone(String phone);

    /**
     * 统计所有司机申请信息
     *
     * @return
     */
    public long countAll();

    /**
     * 根据主键更新司机申请信息
     *
     * @param driverApply
     * @return
     */
    public int updateByPrimaryKey(DriverApply driverApply);
}
